home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 16 / AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso / pd / anwendungen / ispell-3.1.18src / proto.h < prev    next >
C/C++ Source or Header  |  1995-06-29  |  12KB  |  298 lines

  1. /*
  2.  * $Id: proto.h 1.2 1995/06/24 09:22:34 nobody Exp nobody $
  3.  *
  4.  * Copyright 1992, 1993, Geoff Kuenning, Granada Hills, CA
  5.  * All rights reserved.
  6.  *
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  *
  11.  * 1. Redistributions of source code must retain the above copyright
  12.  *    notice, this list of conditions and the following disclaimer.
  13.  * 2. Redistributions in binary form must reproduce the above copyright
  14.  *    notice, this list of conditions and the following disclaimer in the
  15.  *    documentation and/or other materials provided with the distribution.
  16.  * 3. All modifications to the source code must be clearly marked as
  17.  *    such.  Binary redistributions based on modified source code
  18.  *    must be clearly marked as modified versions in the documentation
  19.  *    and/or other materials provided with the distribution.
  20.  * 4. All advertising materials mentioning features or use of this software
  21.  *    must display the following acknowledgment:
  22.  *      This product includes software developed by Geoff Kuenning and
  23.  *      other unpaid contributors.
  24.  * 5. The name of Geoff Kuenning may not be used to endorse or promote
  25.  *    products derived from this software without specific prior
  26.  *    written permission.
  27.  *
  28.  * THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
  29.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  30.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  31.  * ARE DISCLAIMED.  IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
  32.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  33.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  34.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  35.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  36.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  37.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  38.  * SUCH DAMAGE.
  39.  *
  40.  */
  41.  
  42. /*
  43.  * $Log: proto.h $
  44.  * Revision 1.2  1995/06/24  09:22:34  nobody
  45.  * Added proto for servermode()
  46.  *
  47.  * Revision 1.1  1995/06/23  20:30:41  nobody
  48.  * Initial revision
  49.  *
  50.  * Revision 1.15  1994/10/25  05:46:38  geoff
  51.  * Protoize bzero the way 4.1.1 does it (which I hope is the standard).
  52.  *
  53.  * Revision 1.14  1994/05/24  06:23:10  geoff
  54.  * Make cap_ok a global routine.
  55.  *
  56.  * Revision 1.13  1994/05/17  06:44:20  geoff
  57.  * Add the new arguments to chk_aff, good, and compoundgood.
  58.  *
  59.  * Revision 1.12  1994/03/16  03:49:15  geoff
  60.  * Add an ifdef so that there won't be a conflict with the definition of
  61.  * free() on braindamaged Sun systems.
  62.  *
  63.  * Revision 1.11  1994/02/14  00:34:55  geoff
  64.  * Add new arguments to the prototype for correct().
  65.  *
  66.  * Revision 1.10  1994/02/08  05:45:34  geoff
  67.  * Don't undef P unless we're going to redefine it
  68.  *
  69.  * Revision 1.9  1994/02/07  08:10:47  geoff
  70.  * Add the GENERATE_LIBRARY_PROTOS option.  Put the definitions of
  71.  * index/rindex back the way they were, because that's what's needed on
  72.  * my system (sigh).
  73.  *
  74.  * Revision 1.8  1994/02/07  05:45:25  geoff
  75.  * Change the second parameter of index/rindex to be a char
  76.  *
  77.  * Revision 1.7  1994/01/25  07:12:05  geoff
  78.  * Get rid of all old RCS log lines in preparation for the 3.1 release.
  79.  *
  80.  */
  81.  
  82. extern int    addvheader P ((struct dent * ent));
  83. extern void    askmode P ((void));
  84. extern void    backup P ((void));
  85. #ifndef NO_CAPITALIZATION_SUPPORT
  86. extern int    cap_ok P ((ichar_t * word, struct success * hit, int len));
  87. #endif /* NO_CAPITALIZATION_SUPPORT */
  88. extern int    casecmp P ((char * a, char * b, int canonical));
  89. extern void    chupcase P ((char * s));
  90. extern void    checkfile P ((void));
  91. extern void    checkline P ((FILE * ofile));
  92. extern void    chk_aff P ((ichar_t * word, ichar_t * ucword, int len,
  93.           int ignoreflagbits, int allhits, int pfxopts, int sfxopts));
  94. extern int    combinecaps P ((struct dent * hdr, struct dent * newent));
  95. extern int    compoundgood P ((ichar_t * word, int pfxopts));
  96. extern void    copyout P ((char ** cc, int cnt));
  97. extern void    correct P ((char * ctok, int ctokl, ichar_t * itok, int itokl,
  98.           char ** curchar));
  99. extern char *    do_regex_lookup P ((char * expr, int whence));
  100. extern SIGNAL_TYPE done P ((int));
  101. extern void    dumpmode P ((void));
  102. extern void    erase P ((void));
  103. extern int    expand_pre P ((char * croot, ichar_t * rootword,
  104.           MASKTYPE mask[], int option, char *extra));
  105. extern int    expand_suf P ((char * croot, ichar_t * rootword,
  106.           MASKTYPE mask[], int crossonly, int option, char * extra));
  107. extern int    findfiletype P ((char * name, int searchnames,
  108.           int * deformatter));
  109. extern void    flagpr P ((ichar_t * word, int preflag, int prestrip,
  110.           int preadd, int sufflag, int sufadd));
  111. extern void    givehelp P ((int interactive));
  112. extern int    good P ((ichar_t * word, int ignoreflagbits, int allhits,
  113.           int pfxopts, int sfxopts));
  114. extern int    hash P ((ichar_t * word, int hashtablesize));
  115. #ifndef ICHAR_IS_CHAR
  116. extern int    icharcmp P ((ichar_t * s1, ichar_t * s2));
  117. extern ichar_t * icharcpy P ((ichar_t * out, ichar_t * in));
  118. extern int    icharlen P ((ichar_t * str));
  119. extern int    icharncmp P ((ichar_t * s1, ichar_t * s2, int n));
  120. #endif /* ICHAR_IS_CHAR */
  121. extern int    ichartostr P ((char * out, ichar_t * in, int outlen,
  122.           int canonical));
  123. extern char *    ichartosstr P ((ichar_t * in, int canonical));
  124. extern int    ins_root_cap P ((ichar_t * word, ichar_t * pattern,
  125.           int prestrip, int preadd, int sufstrip, int sufadd,
  126.           struct dent * firstdent, struct flagent * pfxent,
  127.           struct flagent * sufent));
  128. extern void    inverse P ((void));
  129. extern int    linit P ((void));
  130. extern struct dent * lookup P ((ichar_t * word, int dotree));
  131. extern void    lowcase P ((ichar_t * string));
  132. extern int    makedent P ((char * lbuf, int lbuflen, struct dent * d));
  133. extern void    makepossibilities P ((ichar_t * word));
  134. extern void    move P ((int row, int col));
  135. extern void    normal P ((void));
  136. extern char *    printichar P ((int in));
  137. #ifdef USESH
  138. extern int    shellescape P ((char * buf));
  139. extern void    shescape P ((char * buf));
  140. #else /* USESH */
  141. #ifndef REGEX_LOOKUP
  142. extern int    shellescape P ((char * buf));
  143. #endif /* REGEX_LOOKUP */
  144. #endif /* USESH */
  145. extern char *    skipoverword P ((char * bufp));
  146. extern void    stop P ((void));
  147. extern int    stringcharlen P ((char * bufp, int canonical));
  148. extern int    strtoichar P ((ichar_t * out, char * in, int outlen,
  149.           int canonical));
  150. extern ichar_t * strtosichar P ((char * in, int canonical));
  151. extern void    terminit P ((void));
  152. extern void    toutent P ((FILE * outfile, struct dent * hent,
  153.           int onlykeep));
  154. extern void    treeinit P ((char * persdict, char * LibDict));
  155. extern void    treeinsert P ((char * word, int wordlen, int keep));
  156. extern struct dent * treelookup P ((ichar_t * word));
  157. extern void    treeoutput P ((void));
  158. extern void    upcase P ((ichar_t * string));
  159. #ifndef NO_CAPITALIZATION_SUPPORT
  160. extern long    whatcap P ((ichar_t * word));
  161. #endif
  162. extern char *    xgets P ((char * string, int size, FILE * stream));
  163. extern void    yyinit P ((void));
  164. extern int    yyopen P ((char * file));
  165. extern int    yyparse P ((void));
  166.  
  167. extern void    myfree P ((VOID * area));
  168. extern VOID *    mymalloc P ((unsigned int));
  169. extern VOID *    myrealloc P ((VOID * area, unsigned int size,
  170.           unsigned int oldsize));
  171.  
  172. /*
  173.  * C library functions.  If possible, we get these from stdlib.h.
  174.  *
  175.  * Even if stdlib.h doesn't exist, we don't generate proper prototypes
  176.  * on most systems.  This protects us against minor differences in
  177.  * declarations that break the compilation unnecessarily.
  178.  * GENERATE_LIBRARY_PROTOS is mostly for the benefit of the ispell
  179.  * developer.
  180.  */
  181. #ifndef GENERATE_LIBRARY_PROTOS
  182. #undef P
  183. #define P(x)    ()
  184. #endif /* GENERATE_LIBRARY_PROTOS */
  185.  
  186. #ifdef NO_STDLIB_H
  187. extern int    access P ((const char * file, int mode));
  188. extern int    atoi P ((const char * string));
  189. #ifndef USG
  190. extern VOID *    bcopy P ((const VOID * src, VOID * dest, unsigned int size));
  191. extern void    bzero P ((VOID * dest, int size));
  192. #endif /* USG */
  193. extern VOID *    calloc P ((unsigned int nelems, unsigned int elemsize));
  194. #ifdef _POSIX_SOURCE
  195. extern int    chmod P ((const char * file, unsigned int mode));
  196. #else /* _POSIX_SOURCE */
  197. extern int    chmod P ((const char * file, unsigned long mode));
  198. #endif /* POSIX_SOURCE */
  199. extern int    close P ((int fd));
  200. extern int    creat P ((const char * file, int mode));
  201. extern int    execvp P ((const char * name, const char * argv[]));
  202. extern void    _exit P ((int status));
  203. extern void    exit P ((int status));
  204. extern char *    fgets P ((char * string, int size, FILE * stream));
  205. extern int    fork P ((void));
  206. #ifdef __STDC__
  207. /*
  208.  * Some flaming cretin at Sun decided that free() should be declared
  209.  * as returning an int in /usr/include/malloc.h, so the following
  210.  * declaration causes a conflict.  Fortunately, it doesn't really do a
  211.  * lot of harm to leave it undeclared, since (a) we always properly
  212.  * ignore the return value and (b) any machine that really needs
  213.  * special code to handle ignoring the return value is likely to also
  214.  * provide a correct declaration.
  215.  *
  216.  * (Why is this ifdef'ed on __STDC__?  Because I want it to be correct
  217.  * on my development machine, so I can catch lint problems.)
  218.  *
  219.  * A pox on those who violate long-established standards!
  220.  */
  221. extern void    free P ((VOID * area));
  222. #endif /* __STDC__ */
  223. extern char *    getenv P ((const char * varname));
  224. extern int    ioctl P ((int fd, int func, char * arg));
  225. extern int    kill P ((int pid, int sig));
  226. extern int    link P ((const char * existing, const char * new));
  227. extern long    lseek P ((int fd, long offset, int whence));
  228. extern VOID *    malloc P ((unsigned int size));
  229. #ifdef USG
  230. extern VOID *    memcpy P ((VOID * dest, const VOID * src));
  231. extern VOID *    memset P ((VOID * dest, int val, unsigned int len));
  232. #endif /* USG */
  233. extern char *    mktemp P ((char * prototype));
  234. extern int    open P ((const char * file, int mode));
  235. extern void    perror P ((const char * msg));
  236. extern void    qsort P ((VOID * array, unsigned int nelems,
  237.           unsigned int elemsize,
  238.           int (*cmp) (const VOID * a, const VOID * b)));
  239. extern int    read P ((int fd, VOID * buf, unsigned int n));
  240. extern VOID *    realloc P ((VOID * area, unsigned int size));
  241. extern unsigned int
  242.         sleep P ((unsigned int));
  243. extern char *    strcat P ((char * dest, const char * src));
  244. #ifdef USG
  245. extern char *    strchr P ((const char * string, int ch));
  246. #endif /* USG */
  247. extern int    strcmp P ((const char * s1, const char * s2));
  248. extern char *    strcpy P ((char * dest, const char * src));
  249. extern unsigned    int
  250.         strlen P ((const char * str));
  251. extern int    strncmp P ((const char * s1, const char * s2,
  252.           unsigned int len));
  253. #ifdef USG
  254. extern char *    strrchr P ((const char * string, int ch));
  255. #endif /* USG */
  256. extern int    system P ((const char * command));
  257. extern int    unlink P ((const char * file));
  258. extern int    wait P ((int * statusp));
  259. #else /* NO_STDLIB_H */
  260. #include <stdlib.h>
  261. #include <string.h>
  262. #endif /* NO_STDLIB_H */
  263.  
  264. #ifndef USG
  265. extern char *    index P ((const char * string, int ch));
  266. extern char *    rindex P ((const char * string, int ch));
  267. #endif /* USG */
  268. #ifdef REGEX_LOOKUP
  269. #ifdef USG
  270. extern char *    regcmp P ((const char * expr, const char * terminator, ...));
  271. extern char *    regex P ((const char * pat, const char * subject, ...));
  272. #else /* USG */
  273. extern char *    re_comp P ((const char * expr));
  274. extern int *    re_exec P ((const char * pat));
  275. #endif /* USG */
  276. #endif /* REGEX_LOOKUP */
  277. extern int    tgetent P ((char * buf, const char * termname));
  278. extern int    tgetnum P ((const char * id));
  279. extern char *    tgetstr P ((const char * id, char ** area));
  280. extern char *    tgoto P ((const char * cm, int col, int row));
  281. extern char *    tputs P ((const char * str, int pad, int (*func) (int ch)));
  282.  
  283. #ifndef GENERATE_LIBRARY_PROTOS
  284. #ifdef __STDC__
  285. #undef P
  286. #define P(x)    x
  287. #endif /* __STDC__ */
  288. #endif /* GENERATE_LIBRARY_PROTOS */
  289.  
  290. #ifdef AMIGA
  291. extern struct RexxMsg *syncRexxCmd(char *, struct RexxMsg *msg);
  292. extern void dispRexxPort(void);
  293. extern void replyRexxCmd(struct RexxMsg *, long, long, char *);
  294. extern void    servermode P ((void));
  295. extern void disp (struct RexxMsg *msg, struct rexxCommandList *dat, char *p);
  296.  
  297. #endif /* AMIGA */
  298.